home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 159 / 159.d81 / floyd kirk (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  2KB  |  52 lines

  1. 6 poke53371,0:rem 20 mhz if supercpu
  2. 8 dv=peek(186):ifdv<8thendv=8
  3. 10 print "[147]  [195]rypto [195]hallenge [211]olution [199]enerator"
  4. 20 print " (puzzle on [204][207][193][196][211][212][193][210] [201]ssue 156 [196]isk 2)"
  5. 30 print tab(7);"[208]rogrammed by [198]loyd [210]. [203]irk": print
  6. 40 print "[208]lace a newly formatted disk in drive 8."
  7. 50 print "[211]olutions will be generated, shown on"
  8. 60 print "the screen, and stored on disk in a"
  9. 70 print "sequential file (which can be read by a"
  10. 80 print "[211]olution [210]eader program also on the"
  11. 90 print "disk). [212]his program takes about 2 hours"
  12. 100 print "and 15 minutes to run on a 1 [205][200]z [195]-64"
  13. 110 print "and the solution file takes about 637"
  14. 120 print "blocks on a disk (there are 2808"
  15. 130 print "solutions).": print
  16. 140 print "[208]ress [211][208][193][195][197] [194][193][210] to continue.": print: a$=""
  17. 150 get a$: if a$="" then 150
  18. 160 remopen 8,dv,8,"0:solutions,s,w":rem   rem this line if disk file not wanted
  19. 170 sc=0: for o=-19 to 19
  20. 180 for n=19 to -19 step -1: if n=o then 450
  21. 190 e=1-o-n: if e<-19 or e>19 or e=o or e=n then 450
  22. 200 t=10-e-n: if t<-19 or t>19 or t=o or t=n or t=e then 450
  23. 210 i=9-n-n-e: if i<-19 or i>19 or i=o or i=n or i=e or i=t then 450
  24. 220 w=2-t-o: if w<-19 or w>19 or w=o or w=n or w=e or w=t or w=i then 450
  25. 230 for l=-19 to 19: if l=o or l=n or l=e or l=t or l=i or l=w then 440
  26. 240 v=11-e-l-e-e-n: if v<-19 or v>19 or v=o or v=n or v=e or v=t then 440
  27. 250 if v=i or v=w or v=l then 440
  28. 260 if t+w+e+l+v+e<>12 then 440
  29. 270 s=7-e-v-e-n: if s<-19 or s>19 then 440
  30. 280 if s=e or s=i or s=l or s=n or s=o or s=t or s=v or s=w then 440
  31. 290 x=6-s-i: if x<-19 or x>19 then 440
  32. 300 if x=e or x=i or x=l or x=n or x=o or x=t or x=v or x=w or x=s then 440
  33. 310 f=5-i-v-e: if f<-19 or f>19 or f=w or f=x then 440
  34. 320 if f=e or f=i or f=l or f=n or f=o or f=s or f=t or f=v then 440
  35. 330 for r=19 to -19 step -1: if r=e or r=f or r=i or r=l or r=n then 430
  36. 340 if r=o or r=s or r=t or r=v or r=w or r=x then 430
  37. 350 h=3-t-r-e-e: if h<-19 or h>19 or h=e or h=f or h=i or h=l or h=n then 430
  38. 360 if h=o or h=r or h=s or h=t or h=v or h=w or h=x then 430
  39. 370 g=8-e-i-h-t: if g<-19 or g>19 or g=e or g=f or g=h or g=i or g=l then 430
  40. 380 if g=n or g=o or g=r or g=s or g=t or g=v or g=w or g=x then 430
  41. 390 u=4-f-o-r: if u<-19 or u>19 or u=e or u=f or u=g or u=h or u=i then 430
  42. 400 if u=l or u=n or u=o or u=r or u=s or u=t or u=v or u=w or u=x then 430
  43. 410 sc=sc+1: print sc;e;f;g;h;i;l;n;o;r;s;t;u;v;w;x: print
  44. 420 rem print#8,sc;e;f;g;h;i;l;n;o;r;s;t;u;v;w;x:rem rem line if file not wanted
  45. 430 next r
  46. 440 next l
  47. 450 next n
  48. 460 next o
  49. 470 close8
  50. 480 end
  51. 10000 d=peek(186):n$="floyd kirk":open15,d,15,"s0:"+n$:close15:saven$,d:end
  52.